<template>
    <div>
        <el-dialog v-model="dialogVisible" width="80%" :close-on-click-modal="false" align-center :show-close="false"
            :before-close="handleClose" destroy-on-close draggable>
            <template #header="{ close }">
                <div class="dialog-header flex justify-between items-center">
                    <div>论文补录新增</div>
                    <el-icon class="el-icon--left cursor-pointer" @click="close">
                        <CircleCloseFilled color="#fff" />
                    </el-icon>
                </div>
            </template>
            <supplementalPaper :productId="id"></supplementalPaper>
            <template #footer>
                <div class="dialog-footer">
                    <div class="operate-btns">
                        <el-button type="primary" @click="save()">保存</el-button>
                        <el-button type="primary" @click="closeDiglog">关闭</el-button>
                    </div>
                </div>
            </template>
        </el-dialog>
    </div>
</template>

<script setup>
import { nextTick } from 'vue';
import supplementalPaper from "@/views/achievement/components/supplementalPaper.vue"
const dialogVisible = defineModel();
const props = defineProps({
    id: String,
})
const save = () => {
    closeDiglog()
}
const closeDiglog = () => {
    dialogVisible.value = false
    emit('callBack', "")
}
const emit = defineEmits(['callBack']);
const handleClose = (done) => {
    emit('callBack', "")
    done()
}
</script>

<style scoped lang="scss">
@import url("@/views/achievement/index.scss");
</style>